package work724.work2;

public class Frog extends Animal implements Action {
  public Frog() {
  }

  public Frog(String name, String color, String type) {
    super(name, color, type);
  }

  @Override
  public String cry() {
    return "正在呱呱的叫";
  }

  @Override
  public String eat() {
    return "爱吃虫子";
  }

  @Override
  public void swim() {
    System.out.println("虽然不是鱼，但青蛙也是泳坛高手");
  }

  public void show(){
    super.setColor("绿色");
    super.setName("大兵");
    super.setType("非哺乳类");
    System.out.println("那只"+super.getColor()+"的，名字叫"+super.getName()+"的青蛙"+cry());
    System.out.println("青蛙是"+super.getType()+"，"+eat());
    swim();
  }
}
